import vue from 'vue'
import vueRouter from 'vue-router'

vue.use(vueRouter)
import Main from '@/views/Main.vue'
import NotFind from '@/views/NotFind.vue'
import Login from '@/views/Login.vue'
import SignIn from '@/views/SignIn.vue'
import mianjing from '@/views/MianJing.vue'
import TuiJian from '@/views/TuiJian.vue'
import ZuiXin from '@/views/ZuiXin.vue'
import User from '@/views/User.vue'
import ShouCang from '@/views/ShouCang.vue'
import DianZan from '@/views/DianZan.vue'
import Info from '@/views/Info.vue'
const routes = [
    {
        path:'/',
        redirect:Login
    },
    {
        path:'/login',
        name:'MyLogin',
        component:Login
    },
    {
        path:'/signin',
        name:'MySignIn',
        component:SignIn 
    },{
        path:'/info/:id?',
        component:Info 
    },
    {
        path:'/main',
        component:Main,
        children:[
            {
                path:'/main/mianjing',
                component:mianjing,
                children:[
                    {
                        path:'/main/mianjing/tuiJian',
                        component:TuiJian
                    },
                    {
                        path:'/main/mianjing/ZuiXin',
                        component:ZuiXin
                    }
                ]
            },{
                path:'/main/user',
                component:User
            },
            {
                path:'/main/shoucang',
                component:ShouCang
            },
            {
                path:'/main/dianzan',
                component:DianZan
            }
        ]
    },
    {
        path:'*',
        component:NotFind
    }
]
const router = new vueRouter({
    routes
})

export default router